package com.cskaoyan.utils;

import com.cskaoyan.model.vx.vo.WxOrderListVo;

/**
 * @description: TODO
 * @author: jiaolei
 * @date: 2021/12/2 17:31
 */
public class TextAndHandOnWxOrListVoUtil {
    public static String to(WxOrderListVo wxOrderListVo){
        Short status=wxOrderListVo.getOrderStatus();
        WxOrderListVo.HandleOptionBean handleOption =new WxOrderListVo.HandleOptionBean();
        wxOrderListVo.setHandleOption(handleOption);

        Short deleted = wxOrderListVo.getDeleted();


        if(status==101){
                handleOption.setCancel(true);
                handleOption.setPay(true);
            return "未付款";
        }else if(status==201){
            handleOption.setRefund(true);
            return "已付款";
        }else if(status==301){
            handleOption.setConfirm(true);
         return "已发货";
        }else if(status==401){
                handleOption.setAftersale(true);
                handleOption.setComment(true);
                handleOption.setDelete(true);
                handleOption.setRebuy(true);
            return "已收货";
        }else if(status==103){
            handleOption.setDelete(true);
            return "已取消";
        }else if(status==202){
            return "订单取消,退款中";
        }
        return "正在升级";
    }
}
